Maintaining data integrity is essential to the efficacy of computing systems ranging from large-scale data processing systems to portable electronic devices. A transmission or storage error in even a single data bit can have a colossal impact on the intended use of the data or functionality of a computing system. Data corruption can be caused by any number of different factors associated with or otherwise influencing the data transaction, such as component or media failures, transmission line effects, electrical noise, poor connections, and the like.
To minimize the undesired consequences of data corruption, various manners of monitoring for data errors and ensuring data integrity have been implemented. Data errors can be detected using parity techniques, and in some cases may be corrected as in the case of Error Correction Code (ECC) methodologies. ECCs can be generated for a particular data block(s), and can be transmitted and/or stored with the data. Upon receipt or retrieval of the data block, the ECC code is regenerated using the same algorithm, and compared to the received or retrieved data to determine whether there is a disparity. If such a disparity exists, the data can in many cases be corrected, thereby obviating the need to retransmit the data or replace stored data.
Despite the ability and need to ensure data integrity, implementation of these error detection and correction techniques carries a price. The transmission of an ECC displaces the transmission of other relevant data, and requires generation and processing of the codes. This overhead can adversely impact system throughput and consume valuable processing resources. Therefore, while the importance of ensuring data integrity is arguably paramount to the issue of error detection/correction overhead, this overhead must be properly managed to minimize any resulting negative impact on system performance. Furthermore, while some overhead may be inevitable, it is important that the time and resources expended in generating the ECC is fruitful, and that fault isolation is as accurate as possible.
One data processing operation that is vulnerable to ECC inefficiencies and/or imprecision in isolating the source of data errors involves the merging of data. Merging one block of data into another can in and of itself increase efficiency and throughput. More particularly, data block sizes continue to increase, largely due to unremitting need to increase data throughput and the corresponding technological advances permitting it. Where the 8-bit byte was once the standard, 64-bit words and larger data blocks are now the norm. Sixty-four bit data buses now facilitate the collective storing of eight bytes, which in the previous 8-bit world would require eight separate data transactions. Notwithstanding the benefits of larger data block sizes, it is often the case that only a portion of a large stored data block needs to be modified. In such cases, it is desirable to “merge” one data block into another, creating a resulting data block that is only partially modified. For example, only a portion (e.g., one or more bits, nibbles, bytes, etc.) of a byte, word, cache line or other data block may change, whereby only a portion of the cache line may need to be updated in the cache or other storage module. By allowing such merge functions, an entire cache line or other data block does not need to be rewritten to the cache or other memory when only a portion of the data has changed.
Where the original data blocks being merged include ECCs, the resulting data block must also include an ECC to retain the desired error detection/correction facilities. As alluded to above, throughput inefficiencies, as well as an inability to accurately isolate the source of data errors, may be experienced in the creation of an ECC for the resulting merged data block. A current manner in which ECCs are provided for merged data is to recalculate the entire ECC of the resulting data block, following the merge operation. For example, an ECC is calculated for both data blocks of the merger, the data is merged, and then a resulting ECC is calculated. However, because a new ECC is calculated after the data is merged, there is no way to verify that data corruption was not introduced during the merge operation itself. Errors resulting from the merge operation are not detected in connection with the merge operation, and fault isolation objectives may be frustrated.
Accordingly, it would be desirable to provide a manner for addressing the aforementioned and other shortcomings of the prior art. The present invention fulfills these and other needs, and provides an apparatus and method for providing efficient and accurate error detection/correction for use in connection with data merging operations.